//
//  YTDriverManagerViewCell.m
//  YiTuDriverClient
//
//  Created by 石少庸 on 2017/7/18.
//  Copyright © 2017年 Yitu. All rights reserved.
//

#import "YTDriverManagerViewCell.h"
#import "YTTeamDriverModel.h"

@interface YTDriverManagerViewCell ()
@property (weak, nonatomic) IBOutlet UILabel *driverNameText;
@property (weak, nonatomic) IBOutlet UILabel *phoneNumText;
@property (weak, nonatomic) IBOutlet UILabel *wechatNumText;
@property (weak, nonatomic) IBOutlet UILabel *sumOrdersText;
@property (weak, nonatomic) IBOutlet UILabel *completeOrdersText;
@property (weak, nonatomic) IBOutlet UILabel *unCompeteOrdersText;
@end

@implementation YTDriverManagerViewCell

- (void)setModel:(YTTeamDriverModel *)model {
    _model = model;
    _driverNameText.text = model.contactName;
    _phoneNumText.text = model.phone;
    _wechatNumText.text = model.wechat;
    _sumOrdersText.text = model.allOrderNumber;
    _completeOrdersText.text = model.finishedOrderNumber;
    _unCompeteOrdersText.text = model.noFinishedOrderNumber;
}

- (IBAction)deleteDriverAction:(UIButton *)sender {
    if (_deleteAction) {
        _deleteAction(_model.driverId);
    }
}

@end
